<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>
<style>
    body {
        font-family: Arial, sans-serif;
        background-color: #f4f4f9;
        margin: 0;
        padding: 0;
        position: relative; /* 确保所有子元素可以相对于body定位 */
    }
    .logo {
        background-color: #007bff;
        color: white;
        text-align: left;
        padding: 10px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 30px;
        z-index: 1000;
    }
    .logo h2 {
        margin: 0;
        position: absolute;
        top: 50%;
        left: 20px;
        transform: translateY(-50%);
    }
    .logo nav {
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
    }
    .logo nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: block; /* 确保ul是一个块级容器 */
    }
    .logo nav li {
        display: inline-block; /* 将li设置为inline-block以实现水平排列 */
        margin-left: 20px;
    }
    .logo nav a {
        color: white;
        text-decoration: none;
        padding: 10px 20px;
        display: inline-block; /* 确保链接是inline-block */
    }
    .logo nav a.current {
        background-color: #fff;
        color: #007bff;
        border-radius: 5px;
        border: 1px solid #007bff;
        padding-top: 6px;
        padding-bottom: 7px;
    }
    .container {
        width: 70%;
        margin: 0 auto;
        margin-top: 100px; /* 确保内容在logo下方 */
        position: relative;
    }
    .card {
        margin-top: 20px;
        padding: 20px;
        width: 100%;
        border: 1px solid #ccc;
        background-color: #fff;
        box-sizing: border-box;
        text-align: center; /* 确保内部内容居中对齐 */
    }
    .card section {
        display: inline-block; /* 将section设置为inline-block */
        vertical-align: top; /* 确保两部分顶部对齐 */
        width: 45%; /* 设置宽度为45%以留出间距 */
    }
    .avatar {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        display: block; /* 确保头像居中 */
        margin: 0 auto;
    }
    .card section:last-child h3 {
        color: #007bff;
        font-size: 24px;
        margin-bottom: 10px;
        text-align: left;
    }
    .card section:last-child p {
        line-height: 1.6;
        font-size: 16px;
        background-image: url('images/R-C.jpg');
        background-size: cover;
        padding: 10px;
        border-top: 3px solid #007bff;
        background-color: #fff;
    }
    footer {
        background-color: #c2bcbc;
        color: white;
        text-align: center;
        padding: 20px;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
    }
    footer a {
        color: #007bff;
        text-decoration: none;
    }
    footer a:hover {
        text-decoration: underline;
    }
    footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 1px;
        background-color: #007bff;
    }
</style>
</head>
<body>
    <div class="logo">
        <h2>Yan.t</h2>
        <nav>
            <ul>
                <li><a href="index.html" class="current">首页</a></li>
                <li><a href="/ex1/htmls/course.html">我的课表</a></li>
                <li><a href="/ex1/htmls/login.html">登录</a></li>
                <li><a href="/ex1/htmls/reg.html">注册</a></li>
            </ul>
        </nav>
    </div>

    <div class="container">
        <div class="card">
            <section>
                <img src="images/th.jpg" alt="个人头像" class="avatar">
            </section>
            <section>
                <h3>Yan.t的个人简介</h3>
                <p>我是一名热爱编程的学生，喜欢阅读、运动和音乐。</p>
            </section>
        </div>
    </div>

    <footer> 
        <a href="mailto:example@example.com">联系我</a>
    </footer>
</body>
</html>